#include"processbar1.h"
#include<string.h>
#include<unistd.h>
const char* label="|/-\\";
void process()
{
    const int n=101;
    char buffer[n];
    memset(buffer,'\0',sizeof(buffer));
    
    int cnt=0;
    int len=strlen(label);
    while(cnt<=100)
    {
        printf("[%-100s][%d%%][%c]\r",buffer,cnt,label[cnt%len]);
        fflush(stdout);
        buffer[cnt++]='#';
        usleep(50000);
    }
    printf("\n");
}
int main()
{
	process();
	return 0;
}
